package com.jydd.singlekotlinmvvm.comm.client.apis

import com.jydd.singlekotlinmvvm.comm.model.response.RepoInfo
import com.jydd.singlekotlinmvvm.comm.model.response.SearchResponse
import retrofit2.http.GET
import retrofit2.http.Path
import retrofit2.http.Query

/**
 * created by 韦敏敏
 * on 2020/1/21
 */
interface GitApi {
    @GET("/users/{username}/{module}")
    suspend fun repos(
        @Path("username") username : String,
        @Path("module") module : String,
        @Query("page") currPage : Int
    ):List<RepoInfo>
    @GET("/search/repositories")
    suspend fun searchReps(
        @Query("q") key: String,
        @Query("sort") sort : String? = "updated",
        @Query("order") order: String? = "desc",
        @Query("page") currPage : Int
    ): SearchResponse
}